﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Identity;
namespace Edu.Entitys
{
    public class AppStudent : FullAuditedAggregateRoot<Guid>
    {
        public Guid UserId
        {
            get;
            set;
        }

        [NotMapped]
        public AppUser User
        {
            get;
            set;
        }

        [NotMapped]
        public IdentityUser IdentityUser
        {
            get;
            set;
        }

        /// <summary>
        /// 老师ID
        /// </summary>
        public Guid TeacherId
        {
            get;
            set;
        }

        /// <summary>
        /// 学生状态
        /// </summary>
        public StudentStatus Status
        {
            get;
            set;
        }

        /// <summary>
        /// 拜师时间
        /// </summary>
        public DateTimeOffset StartStudyTime
        {
            get;
            set;
        }

        /// <summary>
        /// 加入的年
        /// </summary>
        public int JoinYear
        {
            get;
            set;
        }

        /// <summary>
        /// 加入的季度
        /// </summary>
        public int JoinQuarter
        {
            get;
            set;
        }

        /// <summary>
        /// 考核分数
        /// </summary>

        public int? AssessScore
        {
            get;
            set;
        }

        /// <summary>
        /// 毕业时间
        /// </summary>
        public DateTimeOffset? GradTime
        {
            get;
            set;
        }


        public int Rating
        {
            get;
            set;
        }

        public int Rank
        {
            get;
            set;
        }

        public JobType Job
        {
            get;
            set;
        }

        public Dictionary<AbilityType, AbilityTypeLevel> Abilitys { get; set; }
    }


    public class AbilityTypeLevel
    {
        public AbilityLevelType Level { get; set; }
        public int Num { get; set; } //晋升到下个等级拥有的勋章数
        public int Total { get; set; } //总的勋章数
        public int TaskNum { get; set; } //3个60分获得1个勋章获得1个勋章后为0...1个60分+1.
    }
}